package com.trade.module.base.repository;

import com.trade.module.base.entity.User;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

/**
 * Class Description:用户数据库操作层
 *
 * @Version v1.0 2017/4/22 1:05
 * @JDK version 1.8.0_51
 * @Author zfb
 */
@Repository
public interface UserRepository extends PagingAndSortingRepository<User, String>, JpaSpecificationExecutor<User> {
    /**
     * 根据用户帐号和用户数据状态查询用户信息
     * @param account  用户账户
     * @param userFlag 用户状态
     * @param dataFlag 数据状态
     * @return User 用戶信息
     */
    User findByAccountAndUserFlagAndDataFlag(String account, String userFlag, String dataFlag);
}
